<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SUOYUEの好友榜</title>

    <link rel="shortcut icon" th:href="@{/images/favicon.ico}"/>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <link rel="stylesheet" href="../static/css/me.css" th:href="@{/css/me.css}">
</head>
<body>
<!--导航栏-->
<nav class="ui inverted gird-header" >
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui olive header item" style="font-family: STSong">SUOYUE</h2>
            <a href="#" th:href="@{/}" class="m-item item m-mobile-hide"><i class="home icon"></i><span th:text="#{index.home}">首页</span></a>
            <a href="#" th:href="@{/hotArticle}" class="m-item item m-mobile-hide"><i class="clone outline icon"></i><span th:text="#{index.hotArticle}">热门文章</span></a>
            <a href="#" th:href="@{/newArticle}" class="m-item item m-mobile-hide"><i class="clock icon"></i><span th:text="#{index.time}">时间轴</span></a>
            <a href="#" th:href="@{/activeUser}" class="active m-item item m-mobile-hide"><i class="clone outline icon"></i><span th:text="#{index.user}">活跃好友</span></a>
            <a href="#" th:href="@{/message}" class="m-item item m-mobile-hide"><i class="book icon"></i><span th:text="#{index.messages}">留言板</span></a>
<!--            <a href="#" th:href="@{/echarts}" class="m-item item m-mobile-hide"><i class="clone outline icon"></i><span th:text="#{index.map}">疫情地图</span></a>-->
            <!--  创作中心  -->
            <h5 class="m-item item m-mobile-hide" style="font-family: STSong"><a href="#" th:href="@{/user/index}" class="ui inverted green rounded button" ><i class="edit icon"></i>创作中心</a></h5>

            <!--  用户头像  -->
            <div class="left m-item m-mobile-hide menu" th:if="${session.user}">
                <div class="ui dropdown item">
                    <div class="text">
                        <img class="ui avatar image" src="../../static/images/me.jpg" th:src="${session.user.avatar}">
                    </div>
                    <i class="dropdown icon"></i>
                    <div class="menu">
                        <a href="" th:href="@{/logout}" class="item">注销</a>
                    </div>
                </div>
            </div>
            <!--  搜索栏  -->
            <div class="right m-item item m-mobile-hide">
                <form name="search" action="#" th:action="@{/search}" method="post" target="_blank">
                    <div class="ui icon transparent input m-margin-tb-tiny" style="color: white">
                        <input style="color: white" type="text" name="query" placeholder="Search....">
                        <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!--手机端收起导航栏-->
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>


<!--顶部图片-->
<div class="m-bg-type_outer" style="width: 100%;height: 36%">
    <img src="../static/images/friendsbg.jpg" th:src="@{/images/friendsbg.jpg}" alt="" class="ui m-bg image"
         style="width: 100%;height: 100%">
    <div class="m-bg-class_cover">
        <div align="center">
            <div class="ui container" align="center" style="position: relative ;bottom: -590px;">
                <div class="m-font-size-title " align="center" style="font-family:'STXingkai'">好友榜</div>
                <div class="m-font-size-text-init-title m-margin-top" align="center">转瞬即逝的相逢与离别，每一个瞬间，我都想要珍惜</div>
            </div>
        </div>
    </div>
</div>


<!--中间内容-->
<!--自荐-->
<div class="m-padded-tb animated fadeIn">
    <div class="ui m-opacity container">
        <div class="box-shadow-max">
            <div class="ui top attached teal m-opacity segment box-shadow-max">
                <div class="ui m-padded-tb-large m-container-tiny">
                    <div class="ui stackable m-container-mini m-opacity grid">
                        <!--友人帐显示区域-->
                        <div class="m-margin-tb-tiny four wide column" th:each="page: ${pageInfo}">
                            <a href="#" th:href="@{/oneUser/-1/{id}(id=${page.id})}" class="class_outer" target="_blank">
                                <div align="center">
                                    <div class="friends-link">
                                        <img src="../static/images/me.jpg" alt="" class="friends-link-image"
                                             th:src="${page.avatar}">
                                        <div class="m-margin-top">
                                            <h4 class="m-font-size-text-friends m-margin-tb-tiny"
                                                th:text="${page.username}">SUOYUE</h4>
                                        </div>
                                    </div>
                                </div>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--分页-->
        <div class="ui bottom attached segment m-opacity stackable grid">
            <div class="three wide column" align="center">
                <a class="item" th:href="@{/activeUser/(pageNum=${pageInfo.pageNum}-1)}">上一页</a>
            </div>

            <div class="ten wide column" align="center">
                <p> <span th:text="${pageInfo.pageNum}"></span> / <span th:text="${pageInfo.pages}"></span> </p>
            </div>

            <div class="three wide column" align="center">
                <a class="item" th:href="@{/activeUser/(pageNum=${pageInfo.pageNum}+1)}">下一页</a>
            </div>
        </div>
    </div>
</div>

<br>
<br>
<br>
<br>
<br>
<br>

<br>
<br>
<!--底部栏-->
<footer class="ui inverted vertical segment m-padded-tb-massive m-opacity" th:replace="_fragments :: footer">

</footer>
<!--通用script：使用div标签或thymeleaf模板的th:block-->
<th:block th:replace="_fragments :: script">

</th:block>

<script>
    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });

    $('.ui.dropdown').dropdown({
        on : 'hover'
    });

</script>

<!--看板娘-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script src="https://cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget/autoload.js"></script>

</body>
</html>